Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom config loader #889

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Jun 22, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Replace component-config with our implementation, since sigs.k8s.io/controller-runtime/pkg/config/v1alpha1 is now deprecated.

Which issue(s) this PR fixes:

Fixes #725

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 22, 2023
@netlify
Copy link

netlify bot commented Jun 22, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 65431a4
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/64999ed794422400083068ce

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 22, 2023
@alculquicondor
Copy link
Contributor

/assign @tenzen-y

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add comments to point out the original codes? This means which codes did we copy from controller-runtime repository?

@trasc
Copy link
Contributor Author

trasc commented Jun 23, 2023

Can you add comments to point out the original codes? This means which codes did we copy from controller-runtime repository?

done

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2023
apis/config/v1beta1/configuration_types.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
options, err = options.AndFrom(ctrl.ConfigFile().AtPath(configFile).OfKind(&cfg))
}
func apply(configFile string) (ctrl.Options, configapi.Configuration, error) {
options, cfg, err := config.Load(scheme, configFile)
if err != nil {
return options, cfg, err
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a TODO so that the code below goes to pkg/config?

Maybe config.Load can receive the set of available integrations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to, we need to import jobframwork and some of the jobs so the integration list is not empty. This is main reason I did not move this part already.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but if config.Load accepts as a parameter the list of integrations, we don't need the dependency.

I think in general it's a good practice to keep main.go lean. But this is on the nit side.

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jun 26, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, trasc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2023
@k8s-ci-robot k8s-ci-robot merged commit 76b1c35 into kubernetes-sigs:main Jun 26, 2023
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Jun 26, 2023
@trasc trasc deleted the custom-config-loader branch June 28, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace component-config with our implemntation
4 participants